function fn() {
    let arr = ['../img/f13.jpg', '../img/f12.jpg', '../img/f11.jpg', '../img/f10.jpg', '../img/f9.jpg', '../img/f8.jpg', '../img/f7.jpg']
    let imgWrap = document.getElementsByTagName('img')
    let Big = document.getElementsByClassName('big')[0]
    let bigImg = document.getElementsByClassName('bg-img')[0]
    let Span = document.getElementsByTagName('span')
    for (let i = 0; i < imgWrap.length; i++) {
        imgWrap[i].onclick = function () {
            for (let j = 0; j < imgWrap.length; j++) {
                if (i === j) {
                    let arrSrc = arr[j]
                    bigImg.src = arrSrc
                    Big.style.display = 'block'

                }
            }
        }

    }
    for (let i = 0; i < Span.length; i++) {
        Span[i].onclick = function () {
            Big.style.display = 'none'
        }
    }


}


fn();